home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 471 < prev    next >
Internet Message Format  |  1996-08-06  |  2KB

  1. Path: tbj.dec.com!diamond
  2. From: diamond@tbj.dec.com (Norman Diamond)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Is a diagnostic required?
  5. Date: 1 Mar 1996 01:55:51 GMT
  6. Organization: Digital Equipment Corporation Japan , Tokyo
  7. Message-ID: <4h5lf7$doc@usenet.pa.dec.com>
  8. References: <1996Feb23.090526.7591@sq.com> <danpop.824999740@rscernix> <218226403wnr@pires.co.uk>
  9. Reply-To: diamond@tbj.dec.com (Norman Diamond)
  10. NNTP-Posting-Host: jit533.tbj.dec.com
  11.  
  12. In article <218226403wnr@pires.co.uk>, rpp <rpp@pires.co.uk> quotes 100
  13. lines of other people's text while adding his 6 line reply to 4 lines of
  14. Mark Brader's text.  Mr. Parkins, M.A., please learn to use an editor.
  15.  
  16. >> it's rather disgusting that none of the compilers Dan tried was smart
  17. >> and helpful enough to produce the diagnostic anyway -- it would after
  18. >> all be easy enough for them to do so in this case.  (Cancel that remark
  19. >> if they were all compilers intended to be used with lint for checking.)
  20.  
  21. > Don't be too unfair to the compiler writers - they're trying to write
  22. > compilers that accept K&R C as well as ISO C. You may not think this is a
  23. > good idea, but there's vast amounts of legacy code with K&R header 
  24. > files out there....
  25.  
  26. Yes, but this was not a header file and the function being invoked was not
  27. only declared but also defined in the same source file.  Compilers in K&R
  28. days did issue warnings when they could see this kind of mismatch.
  29.  
  30. > The authors of the standard tried to make it 
  31. > compatible with "current practice" (ie K&R) as far as possible: that is 
  32. > why the declaration of foo() with no parameters is allowed at all.
  33.  
  34. Agreed.  If the function being invoked were not defined in the same source
  35. file, then the compiler would have no information about the parameters
  36. actually expected and would still be required to accept this source file.
  37. --
  38.  <<  If this were the company's opinion, I would not be allowed to post it.  >>
  39. "I paid money for this car, I pay taxes for vehicle registration and a driver's
  40. license, so I can drive in any lane I want, and no innocent victim gets to call
  41. the cops just 'cause the lane's not goin' the same direction as me" - J Spammer
  42.